{% extends "bgadmin/layout/base.html" %}
{% load extras %}

<!-- title start -->
{% block title %}首页 - DTS管理后台{% endblock %}
<!-- ./end title -->

<!-- css start -->
{% block css %}
  <style type="text/css">
    .lightbox{
      position: fixed;
      top: 0px;
      left: 0px;
      height: 100%;
      width: 100%;
      z-index: 7;
      opacity: 0.3;
      display: block;
      background-color: rgb(0, 0, 0);
    }
    .pop{
      position: absolute;
      left: 50%;
      width: 894px;
      margin-left: -447px;
      z-index: 9;
    }
  </style>
{% endblock %}
<!-- ./ css -->

<!-- nav start -->
{% block nav %}
  {% include 'bgadmin/layout/nav.html' %}
{% endblock %}
<!-- ./end nav -->

<!-- content start -->
{% block content %}
  <div class="container-fluid content">
    <h1><a href="javascript:void(0)" target="_blank" onclick="showPdf()">显示pdf文档</a></h1>
     <input type="hidden" id="url" name="url" value="{{ 'django.pdf'|media_url }}">
  </div>
{% endblock %}
<!-- ./end content -->

<!-- js start -->
{% block js %}
  <script>
      function showPdf() {
          var container = document.getElementById("container");
          container.style.display = "block";
          var url =$("#url").val();
          window.open('/static/plugins/pdf-js/web/viewer.html?file='+url,'PDF','width:50%;height:50%;top:100;left:100;');
      }
  </script>
{% endblock %}
<!-- ./end js -->